<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 函数 简单数据类型
        // label 
        // Symbol 形式上是函数， 但是简单类型
        const wes = Symbol('wes');
        console.log(wes==Symbol('wes'));
        // 唯一
        console.log(Symbol()==Symbol());
        console.log(wes);
        const classRoom={
            "东理Faker":'li zong',
            [Symbol('刘全能')]:"刘一男",
            [Symbol('刘全能')]:"刘浩",
            [Symbol('mark')]:{grade:50,fender:'male'},
            [Symbol('olivia')]:{grade:80,fender:'female'},
            [Symbol('olivia')]:{grade:80,fender:'female'}
        }
        console.log(Object.keys(classRoom));
        const keys=Object.keys(classRoom);
        const syms=Object.getOwnPropertySymbols(classRoom);
        console.log(syms);
        console.log(classRoom);
        for(let key of keys){
            console.log(classRoom[key]);
        }
        for(let sym of syms){
            console.log(classRoom[sym]);
        }
        // value 放到数组里
        const data =[keys.map(res=>classRoom[res]),...syms.map(res=>classRoom[res])];
        console.log(data,'=======');

        //for in 对象字面量 最根正的遍历api 无法保证顺序
        // symbol 可以给对象带来唯一性，但是他跟传统的key 泾渭分明， object.keys
        for (const person in classRoom){
            console.log(person);
        }
    </script>
</body>
</html>